-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tool that adds/sets tags for collection elements from a file #5462
Tool that adds/sets tags for collection elements from a file #5462
Conversation
While I'm still not sold on #5457 specially, better metadata collection and tooling seems like a great idea regardless of how we use it (select tags in the tool form at runtime vs say restructure the collection using the tags). We should catch them during upload in #5365 - but there are clearly applications for this as well. What do you think about making that boolean a select list and adding remove specified tags as an option? I consider a bug for instance that a name tag as an element would get propagated to the mapped over collection itself and not just the mapped over collection element. Having the ability to hack around these issues might be important? Maybe that is just speculative - but having the select list at least gives us room to grow in that direction without breaking the interface. |
This tags collection elements (but not collections).
47dc350
to
e306a44
Compare
Not sure this is the right thing to do (maybe there is a better way to get an ID?), but it avoids ``` IntegrityError: (psycopg2.IntegrityError) duplicate key value violates unique constraint "tag_name_key" DETAIL: Key (name)=(group) already exists. [SQL: 'INSERT INTO tag (type, parent_id, name) VALUES (%(type)s, %(parent_id)s, %(name)s) RETURNING tag.id'] [parameters: {'parent_id': None, 'type': 0, 'name': u'group'}] galaxy.tools.execute WARNING 2018-02-06 15:22:38,808 [p:2122,w:1,m:0] [uWSGIWorker1Core1] There was a failure executing a job for tool [__TAG_FROM_FILE__] - Error executing tool: (psycopg2.IntegrityError) duplicate key value violates unique constraint "tag_name_key" ```
Very nice - looks good to me! |
This tool can set or add tags from a file. I wrote this for #5457, but I think it may be useful for other applications as well.